package com.yiwyn;

import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.LoggerContext;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.LoggerFactory;

@Slf4j
public class Test {


    static {
        LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
        // 创建带前缀的 Appender
        PrefixedAppender appender = new PrefixedAppender("【test类】 ");
        appender.setContext(loggerContext);
        appender.start();
    }


    public static void test() {
        log.info("===test===");

    }


}
